React = require('react')
Card = require('antd-mobile/lib/card')
# ListView = require('antd-mobile/lib/list-view')
Flex = require('antd-mobile/lib/flex')
Icon = require('antd-mobile/lib/icon')
Toast = require('antd-mobile/lib/toast')
RefreshControl = require('antd-mobile/lib/refresh-control')
TopNotice = require('antd-mobile/lib/notice-bar')
{StyleSheet,WebView,View,Image,Text,ScrollView,TouchableHighlight,StyleSheet,Navigator,ListView,ActivityIndicator,TouchableOpacity} = require('react-native')
Dimensions = require('Dimensions')
{ width, height } = Dimensions.get('window')
{View} = require('react-native')
{fetchGetList,fetchRefreshList} = require('../actions/page_planDetail.js')
{connect} = require('react-redux')
_ = require('underscore')
moment = require('moment')
backImg = require('../img/back.png')

Page_hxjg_detail = React.createClass
  _processTime:(time)->
    t = moment(time)
    t.format('DD/HHmm')
  render:->
    # <View style={styles.cell}>
    #   <Text style={styles.text}>{model.VCCONTAIN}</Text>
    # </View>
    model = @props.model
    <View style={width:width,height:height,flexDirection:'column',backgroundColor:'#ffffff'}>
      <View style={{flexDirection:'row',flex:0,height:60,alignItems:'center', justifyContent:'center',backgroundColor:'#0066FF'}}>
        <View style={{flex:1,padding:10}}>
          <TouchableOpacity onPress={=>@props.navigator.pop()}>
            <Image source={backImg}  style={{height:30,width:30,resizeMode:'contain'}}/>
          </TouchableOpacity>
        </View>
        <View style={{flex:3,justifyContent:'center',alignItems:'center'}}>
          <Text style={{fontSize:20,color:'#ffffff'}}>详情</Text>
        </View>
        <View style={{flex:1,alignItems:'flex-end',padding:10}}>
        </View>
      </View>
      <View style={{flexDirection:'column',flex:1,marginTop:10,backgroundColor:'#ffffff'}}>
        <View style={styles.row}>
          <View style={styles.cell}>
            <Text style={[styles.text,{fontSize:20,fontWeight:'bold',textAlign:'center'}]}>{model.notice_name}</Text>
          </View>
        </View>
        <View style={styles.row}>
          <View style={styles.cell}>
            <Text style={[styles.text,{textAlign:'right'}]}>{model.publish_date}</Text>
          </View>
        </View>
        <View style={[styles.row,{flex:10,marginBottom:40}]}>
          <WebView source={html:model.description} style={{margin:5}}>
          </WebView>
        </View>
      </View>
    </View>
styles = StyleSheet.create
  row:
    flexDirection:'row'
    borderWidth:1
    borderStyle:'solid'
    borderColor:'#CCCCCC'
    backgroundColor:'#ffffff'
    padding:10
    marginLeft:10
    marginRight:10
  cell:
    flex:1
    flexDirection:'row'
  text:
    flex:1


module.exports = Page_hxjg_detail
